#!/usr/bin/perl -w
use v5.10;

sub greet{
    state @names;

    my $name = shift;
    print "Hi $name! ";

    if( @names ) {
        print "I've seen:@names\n";
    }else{
        print "You are the first one here!\n"
    }
    push @names, $name;
}


greet("Fred");
greet("Barney");
greet("Wilma");
greet("Betty");
